home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / BC32.MK < prev    next >
Text File  |  1995-02-06  |  5KB  |  153 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               Borland C++ 4.0 32 bit version. Supports Borland's DOS Power
  12. #               Pack DPMI32 DOS extender and Phar Lap's TNT DOS Extender.
  13. #
  14. # $Id: bc32.mk 1.1 1995/02/06 12:49:39 kjb release $
  15. #
  16. #############################################################################
  17.  
  18. # Disable warnings for macros redefined here that were given
  19. # on the command line.
  20. __.SILENT       := $(.SILENT)
  21. .SILENT         := yes
  22.  
  23. # File suffix definitions
  24.    L            := .lib   # Libraries
  25.    E            := .exe   # Executables
  26.    O            := .obj   # Objects
  27.    A            := .asm   # Assembler sources
  28.    P            := .cpp   # C++ sources
  29.  
  30. # Import enivornment variables that we use
  31. TMPDIR := $(ROOTDIR)/tmp
  32. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA
  33. .IMPORT .IGNORE : USE_TNT USE_WIN32 FPU
  34.  
  35. # We use the MSDOS shell at all times
  36.    SHELL        := $(COMSPEC)
  37.    GROUPSHELL   := $(SHELL)
  38.    SHELLFLAGS   := $(SWITCHAR)c
  39.    GROUPFLAGS   := $(SHELLFLAGS)
  40.    SHELLMETAS   := *"?<>
  41.    GROUPSUFFIX  := .bat
  42.    DIRSEPSTR    := \\
  43.    DIVFILE       = $(TMPFILE:s,/,\)
  44.  
  45. # Default commands for compiling, assembling linking and archiving
  46.    CC           := bcc32    # C-compiler and flags
  47.    CFLAGS       := -4 -H=bcc32.sym -D__MSDOS__
  48.    AS           := tasm     # Assembler and flags
  49.    ASFLAGS      := /mx /m /D__FLAT__ /i$(SCITECH)\INCLUDE
  50.    LD           := bcc32    # Loader and flags
  51.    LDFLAGS       = $(CFLAGS)
  52.    LIB          := tlib     # Librarian
  53.    LIBFLAGS     := /C
  54.  
  55. # Optionally turn on debugging information
  56. .IF $(DBG)
  57.    CFLAGS       += -v       # Turn on debugging for C compiler
  58.    LIBFLAGS     += /P128    # Larger page size for libraries with debug info!
  59.    ASFLAGS      += /zi      # Turn on debugging for assembler
  60. .END
  61.  
  62. # Optionally turn on optimisations
  63. .IF $(OPT)
  64.    CFLAGS       += -4 -O2
  65. .END
  66.  
  67. # Optionally turn on direct i387 FPU instructions
  68.  
  69. .IF $(FPU)
  70.    CFLAGS       += -DFPU387
  71.    ASFLAGS      += -DFPU387
  72. .END
  73.  
  74. # Optionally compile a shareware version of a product
  75. .IF $(SHW)
  76.    LIB_DIR      := LIBSW
  77.    CFLAGS       += -DSHAREWARE
  78. .ELSE
  79.    LIB_DIR      := LIB
  80. .END
  81.  
  82. # Optionally compile a beta release version of a product
  83. .IF $(BETA)
  84.    CFLAGS       += -DBETA
  85.    ASFLAGS      += -DBETA
  86. .END
  87.  
  88. # Optionally use Phar Lap's TNT DOS Extender, otherwise use the DOS Power Pack
  89. .IF $(USE_TNT)
  90.    DX_CFLAGS    += -DTNT
  91.    DX_ASFLAGS   += -DTNT
  92. .ELIF $(USE_WIN32)
  93.    USE_WIN32    := 1
  94.    DX_CFLAGS    += -WX -DWINDPMI32
  95.    DX_ASFLAGS   += -DWINDPMI32
  96. .ELSE
  97.    USE_DPMI32   := 1
  98.    DX_CFLAGS    += -WX -DDPMI32
  99.    DX_ASFLAGS   += -DDPMI32
  100. .END
  101.  
  102. # Place to look for PMODE library files
  103.  
  104. .IF $(MK_PMODE)
  105. .ELIF $(USE_TNT)
  106. PMLIB           := tnt\pmode.lib
  107. .ELIF $(USE_WIN32)
  108. PMLIB           := win32\pmode.lib
  109. .ELSE
  110. PMLIB           := dpmi32\pmode.lib
  111. .END
  112.  
  113. # Define where to install library files
  114.    LIB_BASE     := $(SCITECH)\$(LIB_DIR)\BC32
  115.    LIB_DEST     := $(LIB_BASE)
  116.  
  117. # Definition of $(MAKE) macro for recursive makes.
  118.    MAKE = $(MAKECMD) $(MFLAGS)
  119.  
  120. # Macro to install a library file
  121.    INSTALL      := cp
  122.  
  123. # Implicit generation rules for making object files
  124.    %$O: %.c ; +$(CC) @$(mktmp $(CFLAGS)) -c $<
  125.    %$O: %$P ; +$(CC) @$(mktmp $(CFLAGS)) -c $<
  126.    %$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
  127.  
  128. # Implicit rule for building a library file using response file
  129.    %$L:      ; $(LIB) $(LIBFLAGS) $@ @$(mktmp -+$(?:t" &\n-+")\n)
  130.  
  131. # Implicit rule for building an executable file using response file
  132.  
  133. .IF $(USE_TNT)
  134.    %$E: ;
  135. @[
  136.     @cp $(mktmp stub 'gotnt.exe') $*.def
  137.     $(LD) @$(mktmp $(LDFLAGS) -e$@ $(&:s/\/\\) $(PMLIB) $(EXELIBS) dosx32.lib)
  138.     @rm $*.def
  139. ]
  140. .ELSE
  141.    %$E:      ; +$(LD) @$(mktmp $(LDFLAGS) -e$@ $(&:s/\/\\) $(PMLIB) $(EXELIBS))
  142. .END
  143.  
  144. # DMAKE uses this recipe to remove intermediate targets
  145. .REMOVE :; $(RM) -f $<
  146.  
  147. # Turn warnings back to previous setting.
  148. .SILENT := $(__.SILENT)
  149.  
  150. # We dont use TABS in our makefiles
  151. .NOTABS         := yes
  152.  
  153.